@layout("/common/_container.html",{js:["/assets/tool/toolOrderPut/toolOrderPut.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">云仓入库表管理</span>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form toolbar">
                        <div class="layui-form-item">
		                    <div class="layui-inline">
								<select id="billstate">
					            	<option value="">选择状态</option>
					            	<option value="WAREHOUSED">WAREHOUSED</option>
					            	<option value="待提交">待提交</option>
					            	<option value="撤回">撤回</option>
					            	<option value="作废">作废</option>
					        	</select>
		                    </div>
				            <div class="layui-inline">
                				<input id="condition" class="layui-input" type="text" placeholder="客户单号、系统单号"/>
				            </div>
		                    <div class="layui-inline">
								<select id="putCustomerId">
					            	<option value="">选择客户</option>
						            @for(item in customerlist!){
						            <option value="${item.id}">${item.customerName}</option>
						            @}
					        	</select>
		                    </div>
		                    <div class="layui-inline">
								<select id="warehouseId">
					            	<option value="">选择仓库</option>
						            @for(item in basicWarehouseList!){
						            <option value="${item.id}">${item.warehouseName}</option>
						            @}
					        	</select>
		                    </div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="startTime" class="layui-input" type="text" placeholder="制单时间从"/>
		                    </div>
                            <div class="layui-inline">
                            	一
                            </div>
		                    <div class="layui-inline" style="width: 150px;">
		                        <input id="endTime" class="layui-input" type="text" placeholder="制单时间至"/>
		                    </div>
				            <div class="layui-inline">
				                <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
				                <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>
				                <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>
				                <button id="btnExpimport" class="layui-btn icon-btn"><i class="layui-icon">&#xe67c;</i>导入excel</button>
			                	<button id="pulljstputorder" class="layui-btn icon-btn"><i class="layui-icon">&#xe601;</i>拉取聚水潭采购入库单</button>
			                	<!-- <button id="pulljstreturngoods" class="layui-btn icon-btn"><i class="layui-icon">&#xe601;</i>拉取聚水潭退货入库明细</button> -->
				                <button id="btnPut" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe672;</i>批量入库</button>
				                <button id="btnTovoid" class="layui-btn layui-btn-danger"><i class="layui-icon">&#x1006;</i>批量作废</button>
				            </div>
                        </div>
                    </div>
                    <table class="layui-table" id="toolOrderPutTable" lay-filter="toolOrderPutTable"></table>
                    <table class="layui-table" id="toolOrderPutDetailedTable" lay-filter="toolOrderPutDetailedTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<input id="putDetailedNumber" type="hidden">
<script type="text/html" id="toolbarfromDetailed">
            <div class="layui-inline">
                <input id="condition2" class="layui-input" type="text" placeholder="商品编号"/>
            </div>
            <div class="layui-inline">
                <button id="btnSearchDetailed" class="layui-btn icon-btn"><i class="layui-icon">&#xe615;</i>搜索</button>
                <button id="btnAddDetailed" class="layui-btn icon-btn"><i class="layui-icon">&#xe654;</i>新增明细</button>
            </div>
</script>
<script type="text/html" id="tableBar">
    {{#  if(d.billstate === '作废' ){ }}
    	<a class="layui-btn layui-btn-normal layui-btn-xs" style="font-size: 7px;" lay-event="launch" id="launch">发起</a>
    {{#  }else if(d.billstate === '待提交' ){ }}
    	<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>
    {{#  }else if(d.billstate === 'WAREHOUSED'){ }}
    	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="revoke" id="revoke">撤回</a>
    {{#   } }}
</script>
<script type="text/html" id="tableBarDetailed">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="editDetailed" id="editDetailed">修改</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteDetailed" id="deleteDetailed">删除</a>
</script>

<script type="text/html" id="billstateTpl">
  {{#  if(d.billstate === '作废'){ }}
    <span style="color: #FF4500;font-weight: 600;">{{ d.billstate }}</span>
  {{#  }else if(d.billstate === '待提交'){ }}
    <span style="color: #FFC300;font-weight: 600;">{{ d.billstate }}</span>
  {{#  }else if(d.billstate === 'WAREHOUSED'){ }}
    <span style="color: #43CF7C;font-weight: 600;">{{ d.billstate }}</span>
  {{#  } else { }}
    {{ d.billstate }}
  {{#  } }}
</script>

@}